﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;

namespace AfterEdge.Web.UI
{
    public class UpdatePanelExtenderClientEvents : ClientEvents
    {
        /// <summary>
        /// The initializeRequest method is raised before processing of the asynchronous request starts. You can use this event to cancel a postback.
        /// </summary>
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public ClientEvent InitializeRequest
        {
            get { return base.GetValue("initializeRequest"); }
            set { base.SetValue("initializeRequest", value); }
        }

        /// <summary>
        /// The beginRequest event is raised before the processing of an asynchronous postback starts and the postback is sent to the server. You can use this event to call custom script to set a request header or to start an animation that notifies the user that the postback is being processed. 
        /// </summary>
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public ClientEvent BeginRequest
        {
            get { return base.GetValue("beginRequest"); }
            set { base.SetValue("beginRequest", value); }
        }

        /// <summary>
        /// The pageLoading event is raised after the response from the server to an asynchronous postback is received but before any content on the page is updated. You can use this event to provide a custom transition effect for updated content.
        /// </summary>
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public ClientEvent PageLoading
        {
            get { return base.GetValue("pageLoading"); }
            set { base.SetValue("pageLoading", value); }
        }

        /// <summary>
        /// The pageLoaded event is raised after all content on the page is refreshed, whether it was refreshed because of a synchronous (full-page) postback or an asynchronous postback. You can use this event to provide a custom transition effect for updated content.
        /// </summary>
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public ClientEvent PageLoaded
        {
            get { return base.GetValue("pageLoaded"); }
            set { base.SetValue("pageLoaded", value); }
        }

        /// <summary>
        /// The endRequest event is raised after an asynchronous postback is finished and control has been returned to the browser. You can use this event to provide a notification to users or to log errors.
        /// </summary>
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public ClientEvent EndRequest
        {
            get { return base.GetValue("endRequest"); }
            set { base.SetValue("endRequest", value); }
        }
    }
}
